Skip to content

ci: add NuGet cache to build and build-msix jobs#139

Closed
Copilot wants to merge 2 commits intomasterfrom
copilot/add-nuget-cache-to-build-jobs
Closed

ci: add NuGet cache to build and build-msix jobs#139
Copilot wants to merge 2 commits intomasterfrom
copilot/add-nuget-cache-to-build-jobs

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 2, 2026

build and build-msix jobs were running dotnet restore with no caching, downloading packages fresh on every run. The test job already uses actions/cache@v4 with a nuget-{os}-{csproj-hash} key — adding the same step to the other two jobs lets all matrix runners share the cache.

Changes

  • build job: added actions/cache@v4 before dotnet restore
  • build-msix job: added actions/cache@v4 before dotnet restore

Cache configuration (identical to test job):

- name: Cache NuGet packages
  uses: actions/cache@v4
  with:
    path: ~/.nuget/packages
    key: nuget-${{ runner.os }}-${{ hashFiles('**/*.csproj') }}
    restore-keys: nuget-${{ runner.os }}-

Cache is keyed on .csproj content hash, so stale cache on dependency changes is handled automatically.

Copilot AI changed the title [WIP] Add NuGet cache to build and build-msix CI jobs ci: add NuGet cache to build and build-msix jobs Apr 2, 2026
Copilot AI requested a review from shanselman April 2, 2026 16:39
@shanselman
Copy link
Copy Markdown
Collaborator

Superseded by PR #140 (merged).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Repo Assist] eng: add NuGet cache to build and build-msix CI jobs

2 participants